import { defineConfig } from 'vite'
import { resolve } from "path";
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: [
      {
        find: '@',
        replacement: resolve(__dirname, "src"),
      }
    ]
  },
  server: {
    proxy: {
      "/api11": {
        target: "http://api.mairui.club",
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api11/, ""),
      },
    },
  }
})
